home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4558 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  755 b 

  1. Path: news.cc.uic.edu!usenet
  2. From: Qi Zeng <zeng@sunphy1.phy.uic.edu>
  3. Newsgroups: comp.lang.c
  4. Subject: variable length string
  5. Date: 5 Feb 1996 21:19:35 GMT
  6. Organization: University of Illinois at Chicago
  7. Message-ID: <4f5s97$8sho@tigger.cc.uic.edu>
  8. NNTP-Posting-Host: sunphy1.phy.uic.edu
  9.  
  10. Hi, I have a question in reading a variable length string:
  11. Suppose you want to read from stdin a string, but you do not know how 
  12. long it will be. You have to assign the string to some char*, to use 
  13. it say as an element part of node in an linked  list. 
  14.  How can you do that? . 
  15. I read through the faq and some books, but could not find the answer. 
  16. I can think out a complicate function to do that. But is there any 
  17. simple way to do that?
  18. Thanks in advance.
  19.  
  20. Q I
  21.  
  22.